home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 December / Dec99.iso / Data / Main.dxr / 00066_sounder (MouseMember).ls < prev    next >
Encoding:
Text File  |  1999-10-05  |  925 b   |  41 lines

  1. property enterSound, downSound, upSound
  2.  
  3. on new me
  4.   return me
  5. end
  6.  
  7. on getPropertyDescriptionList me
  8.   d = [:]
  9.   addProp(d, #enterSound, [#default: "none", #format: #string, #comment: "mouseEnter Sound:"])
  10.   addProp(d, #downSound, [#default: "none", #format: #string, #comment: "mouseDown Sound:"])
  11.   addProp(d, #upSound, [#default: "none", #format: #string, #comment: "mouseUp Sound:"])
  12.   return d
  13. end
  14.  
  15. on mouseEnter me
  16.   if the mouseMember = the member of sprite me.spriteNum then
  17.     if enterSound <> "none" then
  18.       puppetSound(enterSound)
  19.     end if
  20.     pass()
  21.   end if
  22. end
  23.  
  24. on mouseDown me
  25.   if the mouseMember = the member of sprite me.spriteNum then
  26.     if downSound <> "none" then
  27.       puppetSound(downSound)
  28.     end if
  29.     pass()
  30.   end if
  31. end
  32.  
  33. on mouseUp me
  34.   if the mouseMember = the member of sprite me.spriteNum then
  35.     if upSound <> "none" then
  36.       puppetSound(upSound)
  37.     end if
  38.     pass()
  39.   end if
  40. end
  41.